﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CE.iPhone.PList;
namespace cczEdit
{
    enum WeaponType
    {
        WTSword = 0,
        WTLance,
        WTBow,
        WTStick,
        WTCannon,
        WTFan,
        WTDSword,

    };
    enum EquipEffectCode
    {
        EENull=0,
        EEPerTurnHP,//每回合恢复HP20%
        EEPerTurnMP,//每回合恢复MP10
        EEPerTurnState,//每回合恢复不良状态
        EEPerTurnExp,//每回合增加Exp4
        EEPerTurnWeaponExp,//每回合增加武器Exp4
        EEPerTurnArmorExp,//每回合增加防具Exp4
        EEAssistAttack,//攻击力+
        EEAssistDefend,//防御力+
        EEAssistWillpower,//精神力+
        EEAssistErupt,//爆发力+
        EEAssistMorale,//士气力+
        EEAssistHP,//HP+
        EEAssistMP,//MP+
        EEAssistExp,//辅助Exp增加150%
        EEAssistMove,//辅助移动力增加+
        EEIgnoreZOC,//突击移动-
        EEIgnoreMovement,//恶路移动-
        EEAttackChaos,//混乱攻击-
        EEAttackPoison,//毒素攻击-
        EEAttackStop,//麻痹攻击-
        EEAttackSilent,//禁咒攻击-
        EEAttackRetort,//攻击遇反击后反击-
        EEAssistAttackLength,//没羽箭-
        EEAttackPierce,//穿透攻击-
        EEAttackNORetort,//无反击攻击-
        EEAttackMuti,//引导攻击-
        EEAttackCrit,//暴击攻击-
        EEAttackHorse,//斩马攻击150%
        EEAssistFireMagic,//辅助火系策略20%
        EEAssistWindMagic,//辅助风系策略20%
        EEReduceMPConsume,//减少MP消耗50%
        EEMysticalMagicEnable,//四圣兽召唤法术-
        EEMagicCopy,//法术模仿-
        EEAssistHitAttack,//辅助攻击命中率+
        EEAssitsHitMagic,//辅助法术命中率15%+
        EEAssistHitAttackBlock,//辅助攻击格挡率15%+
        EEAssistHitMagicBlock,//辅助法术格挡率15%+
        EEAssistHitAllBlock,//辅助攻击与法术格挡率15%+
        EEIgnoreDstAttack,//格挡远程攻击-
        EEIgnoreCritAttack,//格挡暴击攻击-
        EEIgnoreTwoAttack,//格挡两次攻击-
        EEReduceMagicDamage,//减少法术伤害50%+
        EEReduceDstDamage,//减少远距离伤害+
        EEReduceHPToMP,//用MP代替HP损失-
        EEAutoEatBean//受伤害后自动吃豆-
    };
    enum TeamTypeCode
    {
    TCKing=0,
	TCFootman,
	TCArcher,
    TCKnight,
	TCArchKnight,
	TCSiegeWorks,
	TCWarrior,
	TCBandit,
	TCMage,
    TCPriest,
	TCWarlock,
	TCWindMage,
	TCDancer,
    TCXLKnight,
    TCRiser,
    TCPirate,
    TCBear,
    TCTiger,
    TCDudu,
    TCWizard,
    TCImmortal,
    TCForage1,
    TCForage2,
    TCWoodman,
    TCSoidman,
    TCEmperot,
    TCPeople,
    TCAll,
    };
    enum ArmorType
    {
    ATChest=0,
    ATCloth,


    };
    enum SundriesEffectCode
   {
    SEAddHP=0,
    SEAddMP,
    SECureChaos,
    SECurePoison,
    SECureStop,
    SECureSilent,
    SECureAllState,
    SEAddForce,
    SEAddIntelligence,
    SEAddCommand,
    SEAddAgile,
    SEAddLuck,
    SEAddLevel,
    SEAdvance,
    };
    enum MarkType
    {
    MarkTypeCommon1=0,
    MarkTypeAround,
    MarkTypeArcher,
    MarkTypeArcherS,
    MarkTypeArcherSS,
    MarkTypeFireSS,
    MarkTypeCommon2,
    MarkTypeSiege,
    MarkTypeSiegeS,
    MarkTypeArcherL,
    MarkTypeAll,
    MarkTypeOne,
    MarkTypeCommon3,
    MarkTypeCommon4,
    MarkTypeSpecial1,
    MarkTypeSpecial2,
    };

    enum MarkEffectType
    {
    MarkEffectTypeOne=0,
    MarkEffectTypeFive,
    MarkEffectTypeAround,
    MarkEffectTypeLine,
    MarkEffectTypeAll
    };
    enum MagicEffectCode
    {
    MEReduceHP=0,
    MEAddHP,
    MEAddMP,
    MEAbsorbHP,
    MEAbsorbMP,
    METhinking,
    MEStateChoas,
    MEStatePoison,
    MEStateStop,
    MEStateSilent,
    MENormalState,
    MEBuffDamage,
    MEBuffDefend,
    MEBuffErupt,
    MEBuffMorale,
    MEBuffMove,
    MEBuffAll,
    MEUnBuffDamage,
    MEUnBuffDefend,
    MEUnBuffErupt,
    MEUnBuffMorale,
    MEUnBuffMove,
    MEUnBuffAll,
    MEReAction,
    MEBAGUA,
    MEDragon,
    METurtle,
    METiger,
    MEZHUQUE,
    MEWeatherRainstorm,
    MEWeatherSun,
    MEWeatherCloud,
    MESandstorm
    };
    enum MagicTypeCode
    {
    MTLand=0,
    MTFire,
    MTWind,
    MTWater,
    MTOther,
    };
    enum OwnerType
{
    OwnerTypePlayer=0,
    OwnerTypeFriend,
    OwnerTypeEnemy,
    OwnerTypeEnemyHelper,
    OwnerTypePAndF,
    OwnerTypeEAndH,
    OwnerTypeAll
} ;
    enum TileType
    {
    TileTypePlain=0,
    TileTypeGrass,
    TileTypeForest,
    TileTypeWasteLand,
    TileTypeHill,
    TileTypeMountain,
    TileTypeCliff,
    TileTypeSnowfield,
    TileTypeBridge,
    TileTypeRiffle,
    TileTypeMarsh,
    TileTypePool,
    TileTypeSmallRiver,
    TileTypeBigRiver,
    TileTypeFence,
    TileTypeRampart,
    TileTypeCityZone,
    TileTypePass,
    TileTypeCity,
    TileTypeGate,
    TileTypeAbatis,
    TileTypeVillage,
    TileTypeBarrack,
    TileTypeHousing,
    TileTypeTent,
    TileTypeMoat,
    TileTypeFire,
    TileTypeShip,
    TileTypeAltar,
    TileTypeUnderground,
    };
    public enum kInstructType
    {
        kInstructTypeWait=0,//
        kInstructTypeDialog,//1
        kInstructTypeSynchronization,//2
        kInstructTypeInteraction,//3
        kInstructTypeVariableSet,//4
        kInstructTypeVariableTest,//5
        kInstructTypeSetPlaceName,//   6 
        kInstructTypeDramaBegin,//7
        kInstructTypeDramaOver,//8
        kInstructTypeSetLocalVar,//9
        kInstructTypeSetDramaJump,//10
        kInstructTypeSetMoneyDramaAmbition,//11
        kInstructTypeAmbitionTest,//12
        kInstructTypePlayBGM,//13
        kInstructTypePlayAudioEffect,//14
        kInstructTypeStartGuiding,
        kInstructTypeConditionTest,

        kInstructTypeObjectDisplay = 19,//
        kInstructTypeObjectMove,//20
        kInstructTypeObjectAction,//21
        kInstructTypeChangeBg,//22
        kInstructTypeMessage, //23
        kInstructTypeChangeHead, //24
        kInstructTypeSetHeadState,//25
        kInstructTypeLevelUpHero, //26
        kInstructTypeLevelUpTeam,//27
        kInstructTypeLimitPlayerBattle,//28 
        kInstructTypeAddHero, //29
        kInstructTypeSetEventName,//30 
        kInstructTypeSetChapterName,//31
        kInstructTypeSetRAnim,//32
        kInstructTypeMapDisplayHead,//33
        kInstructTypeMapMoveHead,//34
        kInstructTypeMapHideHead,//35
        kInstructTypeRSceneInitialize,//36
        kInstructTypeObjectSwerve,//37
        kInstructTypeObjectHide,//38
        kInstructTypeRMapClear,//39
        kInstructTypeDisplayUI,//40

        kInstructTypeChangeAI=42,//
        kInstructTypeGetItem,//43
        kInstructTypeSetHeroAbility,//44
        kInstructTypeSetEquipment,//45
        kInstructTypeSetGlobalVar,//in Preset46
        kInstructTypeSetFriendBattle,//in Preset47
        kInstructTypeSetEnemyBattle,//in Preset48
        kInstructTypeSetPlayerBattle,//in Preset49
        kInstructTypeSetWeather,//50
        kInstructTypeSetMaxTurns,//51
        kInstructTypeBattleSwerve,//52
        kInstructTypeBattleAction,//53
        kInstructTypeBattleDisplayUnit,//54
        kInstructTypeBattleSetState,//55
        kInstructTypeBattleAddObject,//56
        kInstructTypeBattleExit,//57
        kInstructTypeBattleHideUnit,//58
        kInstructTypeBattleHighLightZone,///59
        kInstructTypeBattleHighLightUnit,///60
        kInstructTypeBattleDisplayCondition,//61
        kInstructTypeBattleDisplayLose,//62
        kInstructTypeBattleDisplayWin,//63
        kInstructTypeBattleChangeVision,//64
        kInstructTypeBattlePlayMagic,//65
        kInstructTypeBattleMove,//66
        kInstructTypeArenaStart,//67
        kInstructTypeArenaOver,//68
        kInstructTypeArenaDisplay,//69
        kInstructTypeArenaDead,//70
        kInstructTypeArenaDialog,//71
        kInstructTypeArenaAction,//72
        kInstructTypeArenaAttackAction1,//73
        kInstructTypeArenaAttackAction2,//74
        kInstructTypeBattleResuscitate,//75
        kInstructTypeEndScene,//76
    };
    enum RDramaActionTag{
    RDramaActionTagNormal=1,//正常
    RDramaActionTagMove=2,//行走
    RDramaActionTagSeatdown=4,//坐下
    RDramaActionTagFaceRed=5,//脸红
    RDramaActionTagHandsUp=6,//举手
    RDramaActionTagCry=7,//哭
    RDramaActionTagStretch=8,//伸手
    RDramaActionTagCourtesy=9,//作揖
    RDramaActionTagSeatDownFaceRed=10,//盘坐脸红
    RDramaActionTagSeatDownHandsUp=11,//盘坐举手
    RDramaActionTagSeatDownCry=12,//盘坐哭
    RDramaActionTagCollapse=13,//倒下
    RDramaActionTagDownOneKnee=14,//单膝跪地
    RDramaActionTagBound=15,//被缚
    RDramaActionTagSwordUp=16,//挥剑扬起
    RDramaActionTagSwordCut=17,//挥剑劈下
    RDramaActionTagCover=18,//活埋
    RDramaActionTagRise=19,//起身
    RDramaActionTagOneHandUp=20//单手举起
};
    enum SDramaActionTag
    {
    SDramaActionTagNormal=1,//正常
    SDramaActionTagHandWeapon=2,//举起武器
    SDramaActionTagDefend=4,//防御
    SDramaActionTagBeAttacked=5,//被攻击
    SDramaActionTagWeakness=6,//虚弱
    SDramaActionTagReadyAttack=7,//攻击预备
    SDramaActionTagAttack=8,//攻击
    SDramaActionTagTwiceAttack=9,//两次攻击
    SDramaActionTagRoundSlow=10,//慢速转圈
    SDramaActionTagBreathe=11,//喘气
    SDramaActionTagAswoon=12,//晕倒
    SDramaActionTagRoundQuick=13,//快速转圈
    SDramaActionTagRoundMiddle=14,//中速转圈
};
    enum kAttributeType
    {
    kAttributeTypeAttack=0,
    kAttributeTypeDefend,
    kAttributeTypeWillpower,
    kAttributeTypeErupt,
    kAttributeTypeMoral,
    kAttributeTypeMaxHP,
    kAttributeTypeMaxMP,
    kAttributeTypeCurHP,
    kAttributeTypeCurMP,
    kAttributeTypeLv,
    kAttributeTypeForce,
    kAttributeTypeCommand,
    kAttributeTypeIntelligence,
    kAttributeTypeAgile,
    kAttributeTypeLuck,
    kAttributeTypeHeadNum,
    };
    enum kBuffType
    {
        kBuffTypeAttack = 0,
        kBuffTypeDefend,
        kBuffTypeWillpower,
        kBuffTypeErupt,
        kBuffTypeMoral,
        kBuffTypeMove,
        kBuffTypeNone,
    };
    enum kLogicalSymbolType
    {
    kLogicalSymbolTypePlus=0,
    kLogicalSymbolTypeMinus=1,
    kLogicalSymbolTypeMuti=2,
    kLogicalSymbolTypeDivide=3,
    kLogicalSymbolTypeEqual=4,
    kLogicalSymbolTypeGreater=5,
    kLogicalSymbolTypeLess=6,
    kLogicalSymbolTypeGreaterEqual=7,
    kLogicalSymbolTypeLessEqual=8
} ;
    enum kAIType
    {
    kAITypePassiveAttack=0,//被动攻击
    kAITypePositiveAttack,//主动攻击
    kAITypeDefend,//坚守原地
    kAITypeAttackUnit,//攻击武将
    kAITypeMoveToPos,//到指定点
    kAITypeFollowUnit,//跟随武将
    kAITypeFleeToPos//逃至指定点
};
    enum CharStateChange
{
    CharStateChangeBuffAttack=0,
    CharStateChangeBuffDefend,
    CharStateChangeBuffErupt,
    CharStateChangeBuffMorale,
    CharStateChangeBuffAll,
    CharStateChangeBuffMove,
    CharStateChangeUnBuffAttack,
    CharStateChangeUnBuffDefend,
    CharStateChangeUnBuffErupt,
    CharStateChangeUnBuffMorale,
    CharStateChangeUnBuffAll,
    CharStateChangeUnBuffMove,
    CharStateChangeRecover,
    CharStateChangeMiss,
    CharStateChangePoison,//14
    CharStateChangeChaos,//15
    CharStateChangeStop,//16
    CharStateChangeSilent,//17
    CharStateChangeNone

};
public enum kLogicalTestType{
    kLogicalTestTypeLocationOfCoord=0,
    kLogicalTestTypeLocationOfRange,
    kLogicalTestTypeNeightbour,
    kLogicalTestTypeState,
    kLogicalTestTypeAmount,
    kLogicalTestTypeTurn,
    kLogicalTestTypeOwner,
    kLogicalTestTypeVariable,
    kLogicalTestTypeWin,
    kLogicalTestTypeLose,
    kLogicalTestTypeMoneyDramaAmbition,
    kLogicalTestTypePlaceholder,//永远返回true
};
 public enum kMessageBoxType{
    kMessageBoxTypeMagicName=0,
    kMessageBoxTypeHeroLvUp,
    kMessageBoxTypeEquipLvUp,
    kMessageBoxTypeMassWord,
    kMessageBoxTypeMapMsg,
};

    /*
 无，后转，前移，小步前移，小步后退，举起武器，防御，受攻击，攻击预备，攻击，二次攻击，晕倒，喘气，撤退
 **/
public enum kArenaActionTag{

    kArenaActionNormal=1,//正常
    kArenaActionHandWeapon=2,//举起武器
    kArenaActionDefend=4,//防御
    kArenaActionBeAttacked=5,//被攻击
    kArenaActionReadyAttack=7,//攻击预备
    kArenaActionAttack=8,//攻击
    kArenaActionTwiceAttack=9,//两次攻击
    kArenaActionBreathe=11,//喘气
    kArenaActionAswoon=12,//晕倒
    kArenaActionTurnBack,//后转
    kArenaActionMoveForward,//前移
    kArenaActionMoveForwardLittle,//小步前移
    kArenaActionMoveBackLittle,//小步后退
    kArenaActionRetreating,//撤退
    
};
/**
 命中，格挡，格挡后退，后退，闪躲绕前
 */
public enum kArenaAttack1ActionTag{
    kArenaAttack1ActionHit=0,
    kArenaAttack1ActionBlock,
    kArenaAttack1ActionBlockBacklash,
    kArenaAttack1ActionBacklash,
    kArenaAttack1ActionTumble
};
/**
 原地攻击，移动攻击，互相冲锋
 */
public enum kArenaAttack2ActionTag{
    kArenaAttack2ActionHit=0,
    kArenaAttack2ActionMoveHit,
    kArenaAttack2ActionChargeHit,
};
    public static class Constant
    {
        public static Dictionary<int, String> weaponTypeDic = new Dictionary<int,string>();
        public static Dictionary<int, String> armorTypeDic = new Dictionary<int, string>();
        public static Dictionary<int, String> equipmentEffectDic = new Dictionary<int, string>();
        public static Dictionary<int, String> teamTypeDic = new Dictionary<int, string>();
        public static Dictionary<int, String> sundryEffectDic = new Dictionary<int, string>();
        public static Dictionary<int, String> markTypeDic = new Dictionary<int, string>();
        public static Dictionary<int, String> markEffectTypeDic = new Dictionary<int, string>();
        public static Dictionary<int, String> magicEffectDic = new Dictionary<int, string>();
        public static Dictionary<int, String> magicTypeDic = new Dictionary<int, string>();
        public static Dictionary<int, String> terrainDic = new Dictionary<int, string>();
        public static Dictionary<int, String> instructTypeDic = new Dictionary<int, string>();
        public static Dictionary<int, String> rDramaActionTag = new Dictionary<int, string>();
        public static Dictionary<int, String> sDramaActionTag = new Dictionary<int, string>();
        public static Dictionary<int, String> attributeType = new Dictionary<int, string>();
        public static Dictionary<int, String> buffType = new Dictionary<int, string>();
        public static Dictionary<int, String> symbolType = new Dictionary<int, string>();
        public static Dictionary<int, String> aiType = new Dictionary<int, string>();
        public static Dictionary<int, String> charStateType = new Dictionary<int, string>();
        public static Dictionary<int, String> logicalTestType = new Dictionary<int, string>();
        public static Dictionary<int, String> messageBoxType = new Dictionary<int, string>();
        public static Dictionary<int, String> arenaActionTag = new Dictionary<int, string>();
        public static Dictionary<int, String> arenaAttack1ActionTag = new Dictionary<int, string>();
        public static Dictionary<int, String> arenaAttack2ActionTag = new Dictionary<int, string>();
        public static Dictionary<int, String> ownTypeDic = new Dictionary<int, string>();
        static Constant()
        {
            LoadWeaponType();
            LoadEquipmentEffect();
            LoadArmorType();
            LoadTeamType();
            LoadSundryEffect();
            LoadMarkType();
            LoadMarkEffectType();
            LoadMagicEffect();
            LoadMagicType();
            LoadTerrain();
            LoadInstructType();
            LoadRDramaActionTag();
            LoadSDramaActionTag();
            LoadAttributeType();
            LoadSymbolType();
            LoadAIType();
            LoadCharStateType();
            LoadLogicalTestType();
            LoadMessageBoxType();
            LoadArenaActionTag();
            LoadArenaAttack1ActionTag();
            LoadArenaAttack2ActionTag();
            LoadOwnerTypeDic();
            LoadBuffType();
        }
        public static void init()
        {
        }
        private static void LoadWeaponType()
        {
            weaponTypeDic.Add(Convert.ToInt32(WeaponType.WTSword), "剑");
            weaponTypeDic.Add(Convert.ToInt32(WeaponType.WTBow), "弓");
            weaponTypeDic.Add(Convert.ToInt32(WeaponType.WTCannon), "炮车");
            weaponTypeDic.Add(Convert.ToInt32(WeaponType.WTDSword), "宝剑");
            weaponTypeDic.Add(Convert.ToInt32(WeaponType.WTFan), "扇");
            weaponTypeDic.Add(Convert.ToInt32(WeaponType.WTLance), "枪");
            weaponTypeDic.Add(Convert.ToInt32(WeaponType.WTStick), "棍");

        }
        private static void LoadArmorType()
        {
            armorTypeDic.Add(Convert.ToInt32(ArmorType.ATChest), "铠甲");
            armorTypeDic.Add(Convert.ToInt32(ArmorType.ATCloth), "衣服");

        }
        private static void LoadEquipmentEffect ()
        {
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EENull), "无");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistAttack), "辅助攻击力");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistDefend), "辅助防御力");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistErupt), "辅助爆发力");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistWillpower), "辅助精神力");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistMorale), "辅助士气");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistMove), "辅助移动力");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistHP), "辅助HP");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistMP), "辅助MP");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistFireMagic), "辅助火类策略");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistWindMagic), "辅助风类策略");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistExp), "辅助获得经验");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistHitAllBlock), "辅助全防御");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistHitAttack), "辅助攻击命中");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistHitAttackBlock), "辅助攻击防御");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistHitMagicBlock), "辅助策略防御");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssitsHitMagic), "辅助策略命中");

            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAttackCrit), "致命一击攻击");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAssistAttackLength), "远距攻击");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAttackHorse), "骑马攻击");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAttackMuti), "引导攻击");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAttackNORetort), "攻击后无反击");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAttackRetort), "遇反击后反击");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAttackPierce), "穿透攻击");

            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAttackChaos), "混乱攻击");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAttackPoison), "中毒攻击");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAttackSilent), "封杀策略");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAttackStop), "麻痹攻击");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEIgnoreMovement), "恶路移动");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEIgnoreZOC), "突击移动");

            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEIgnoreCritAttack), "防御致命一击");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEIgnoreDstAttack), "防御远距攻击");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEIgnoreTwoAttack), "防御两次攻击");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEReduceHPToMP), "MP辅助防御");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEMagicCopy), "策略模仿");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEMysticalMagicEnable), "可以使用禁咒");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEPerTurnArmorExp), "每回合增加防具经验");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEPerTurnExp), "每回合增加经验");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEPerTurnHP), "每回合恢复HP");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEPerTurnMP), "每回合恢复MP");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEPerTurnState), "每回合恢复状态");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEPerTurnWeaponExp), "每回合增加武器经验");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEReduceDstDamage), "减少远距损伤");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEReduceMagicDamage), "减少策略损伤");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEReduceMPConsume), "节约MP");
            equipmentEffectDic.Add(Convert.ToInt32(EquipEffectCode.EEAutoEatBean), "自动用豆");
            equipmentEffectDic = equipmentEffectDic.OrderBy(k => k.Key).ToDictionary(k=>k.Key,v=>v.Value);
        }
        private static void LoadTeamType() 
        {
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCArcher), "弓兵");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCArchKnight), "弓骑兵");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCBandit), "贼兵");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCBear), "驯熊师");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCDancer), "舞娘");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCDudu), "都督");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCEmperot), "皇帝");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCFootman), "步兵");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCForage1), "辎重队");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCForage2), "粮草队");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCImmortal), "仙人");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCKing), "君主");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCKnight), "骑兵");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCMage), "策士");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCPeople), "百姓");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCPirate), "海盗");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCPriest), "风水士");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCRiser), "黄巾军");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCSiegeWorks), "炮车");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCSoidman), "土偶");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCTiger), "驯虎师");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCWarlock), "道士");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCWarrior), "武道家");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCWindMage), "骑马策士");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCWizard), "咒术师");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCWoodman), "木人");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCXLKnight), "西凉骑兵");
            teamTypeDic.Add(Convert.ToInt32(TeamTypeCode.TCAll), "所有兵种");
            teamTypeDic = teamTypeDic.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);

        }
        private static void LoadSundryEffect() 
        {
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SEAddAgile), "敏捷上升");
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SEAddCommand), "统率上升");
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SEAddForce), "武力上升");
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SEAddHP), "恢复HP");
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SEAddIntelligence), "智力上升");
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SEAddLevel), "等级上升");
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SEAddLuck), "运气上升");
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SEAddMP), "恢复MP");
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SEAdvance), "兵种上升");
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SECureAllState), "恢复状态");
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SECureChaos), "治疗混乱");
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SECurePoison), "治疗中毒");
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SECureSilent), "治疗封咒");
            sundryEffectDic.Add(Convert.ToInt32(SundriesEffectCode.SECureStop), "治疗麻痹");
            sundryEffectDic = sundryEffectDic.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);

        }
        private static void LoadMarkType()
        {
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeAll), "全屏幕");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeArcher), "弓兵 弩骑兵");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeArcherL), "弓骑兵");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeArcherS), "弩兵");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeArcherSS), "连弩兵");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeAround), "步兵");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeCommon1), "群雄轻骑兵等");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeCommon2), "没羽箭");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeCommon3), "大没羽箭");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeCommon4), "大大没羽箭");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeFireSS), "爆炎");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeOne), "自己");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeSiege), "轻炮车");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeSiegeS), "霹雳车");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeSpecial1), "比较特殊的形状");
            markTypeDic.Add(Convert.ToInt32(MarkType.MarkTypeSpecial2), "大方块");
            markTypeDic = markTypeDic.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);


        }
        private static void LoadMarkEffectType()
        {
            markEffectTypeDic.Add(Convert.ToInt32(MarkEffectType.MarkEffectTypeAll), "沙暴");
            markEffectTypeDic.Add(Convert.ToInt32(MarkEffectType.MarkEffectTypeAround), "风阵朱雀等");
            markEffectTypeDic.Add(Convert.ToInt32(MarkEffectType.MarkEffectTypeFive), "火阵等");
            markEffectTypeDic.Add(Convert.ToInt32(MarkEffectType.MarkEffectTypeLine), "爆炎");
            markEffectTypeDic.Add(Convert.ToInt32(MarkEffectType.MarkEffectTypeOne), "灼热等");
            markEffectTypeDic = markEffectTypeDic.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);

        }
        private static void LoadMagicType()
        {
            magicTypeDic.Add(Convert.ToInt32(MagicTypeCode.MTFire), "火类");
            magicTypeDic.Add(Convert.ToInt32(MagicTypeCode.MTLand), "地类");
            magicTypeDic.Add(Convert.ToInt32(MagicTypeCode.MTOther), "其他");
            magicTypeDic.Add(Convert.ToInt32(MagicTypeCode.MTWater), "水类");
            magicTypeDic.Add(Convert.ToInt32(MagicTypeCode.MTWind), "风类");
            magicTypeDic = magicTypeDic.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);

        }
        private static void LoadMagicEffect()
        {
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEAddHP), "恢复HP");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEAddMP), "恢复MP");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEBAGUA), "八阵图效果");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEBuffAll), "增强全属性");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEBuffDamage), "增强伤害能力");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEBuffDefend), "增强防御力");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEBuffErupt), "增强爆发力");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEBuffMorale), "增强士气");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEBuffMove), "增强移动力");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEDragon), "青龙效果");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MENormalState), "恢复状态");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEReAction), "再行动");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEReduceHP), "造成HP伤害");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEAbsorbMP), "吸取MP");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEAbsorbHP), "吸取HP");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.METhinking), "冥想效果");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEStateChoas), "造成混乱");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEStatePoison), "造成中毒");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEStateSilent), "造成封咒");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEStateStop), "造成麻痹");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.METiger), "白虎效果");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.METurtle), "玄武效果");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEUnBuffAll), "减弱全属性");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEUnBuffDamage), "减弱伤害能力");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEUnBuffDefend), "减弱防御力");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEUnBuffErupt), "减弱爆发力");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEUnBuffMorale), "减弱士气");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEUnBuffMove), "减弱移动力");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEWeatherCloud), "阴天");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEWeatherRainstorm), "豪雨");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEWeatherSun), "晴明");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MEZHUQUE), "朱雀效果");
            magicEffectDic.Add(Convert.ToInt32(MagicEffectCode.MESandstorm), "沙暴效果");
            magicEffectDic = magicEffectDic.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);



        }
        private static void LoadTerrain()
        {
            terrainDic.Add(Convert.ToInt32(TileType.TileTypePlain), "平原");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeGrass), "草原");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeForest), "树林");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeWasteLand), "荒地");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeHill), "山地");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeMountain), "岩山");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeCliff), "山崖");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeSnowfield), "雪原");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeBridge), "桥梁");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeRiffle), "浅滩");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeMarsh), "沼泽");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypePool), "池塘");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeSmallRiver), "小河");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeBigRiver), "大河");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeFence), "栅栏");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeRampart), "城墙");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeCityZone), "城内");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypePass), "城门");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeCity), "城池");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeGate), "关隘");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeAbatis), "鹿砦");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeVillage), "村庄");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeBarrack), "兵营");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeHousing), "民居");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeTent), "宝物库");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeMoat), "水池");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeFire), "火");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeShip), "船");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeAltar), "祭坛");
            terrainDic.Add(Convert.ToInt32(TileType.TileTypeUnderground), "地下");
            terrainDic = terrainDic.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);


        }
        private static void LoadInstructType()
        {
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeAddHero), "武将加入");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleAction), "战场动作设定");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleAddObject), "战场物体添加");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleDisplayCondition), "显示战役任务");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleDisplayLose), "显示失败");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleDisplayUnit), "隐藏武将出现");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleDisplayWin), "显示胜利");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleExit), "战场撤退");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleHideUnit), "战场武将隐藏");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleHighLightUnit), "战场高亮任务");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleHighLightZone), "战场高亮区域");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleSetState), "武将状态变更");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleSwerve), "战场转向设置");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeChangeAI), "更改AI策略");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeChangeBg), "R剧本背景更改");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeChangeHead), "武将头像更改");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeDialog), "显示对话框");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeDramaBegin), "剧本开始标记");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeDramaOver), "剧本结束标记");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeGetItem), "获得物品");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeInteraction), "选择框");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeLevelUpHero), "武将升级");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeLevelUpTeam), "兵种提升");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeLimitPlayerBattle), "出战限制");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeMessage), "显示信息");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeObjectAction), "武将动作");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeObjectDisplay), "武将出现");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeObjectMove), "武将移动");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetChapterName), "设定章名");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetEnemyBattle), "敌军出场设定");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetEquipment), "装备设定");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetEventName), "事件名称设定");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetFriendBattle), "友军出场设定");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetGlobalVar), "全局变量设定");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetHeadState), "武将头像状态设定");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetHeroAbility), "武将能力设定");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetMaxTurns), "最大回合数设定");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetPlaceName), "地名战役名设定");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetPlayerBattle), "玩家出场设定");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSynchronization), "同步标记");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeVariableSet), "变量赋值");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeVariableTest), "变量测试");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeWait), "延迟");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetWeather), "天气设定");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetLocalVar), "初始化局部变量");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetDramaJump), "剧本跳转设置");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetMoneyDramaAmbition), "钱剧本野心设置");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeAmbitionTest), "忠奸值测试（废弃）");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeSetRAnim), "剧本形象变更");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeMapDisplayHead), "地图头像显示");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeMapMoveHead), "地图头像移动");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeMapHideHead), "地图头像隐藏");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeRSceneInitialize), "R剧本场景清理");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleChangeVision), "地图视点切换");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattlePlayMagic), "播放法术");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleMove), "战场武将移动");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeArenaStart), "单挑开始");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeArenaOver), "单挑结束");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeArenaDisplay), "单挑武将出场");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeArenaDead), "单挑阵亡");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeArenaAction), "单挑动作");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeArenaAttackAction1), "单挑攻击1");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeArenaAttackAction2), "单挑攻击2");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeArenaDialog), "单挑对话");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeObjectSwerve), "武将转向");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeObjectHide), "武将消失");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeRMapClear), "R地图剧本清理");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypePlayBGM), "设置背景音乐");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypePlayAudioEffect), "设置音效");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeStartGuiding), "开启新手指导");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeConditionTest), "条件测试");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeBattleResuscitate), "战场武将复活");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeDisplayUI), "显示菜单");
            instructTypeDic.Add(Convert.ToInt32(kInstructType.kInstructTypeEndScene), "战斗场景结束");

            instructTypeDic= instructTypeDic.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);

        }
        private static void LoadRDramaActionTag() {
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagBound), "被缚");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagCollapse), "倒下");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagCourtesy), "作揖");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagCover), "活埋");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagCry), "哭");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagDownOneKnee), "单膝跪地");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagFaceRed), "脸红");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagHandsUp), "举手");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagMove), "行走");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagNormal), "正常");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagOneHandUp), "单手举起");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagRise), "起身");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagSeatdown), "坐下");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagSeatDownCry), "盘坐哭");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagSeatDownFaceRed), "盘坐脸红");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagSeatDownHandsUp), "盘坐举手");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagStretch), "伸手");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagSwordCut), "挥剑劈下");
            rDramaActionTag.Add(Convert.ToInt32(RDramaActionTag.RDramaActionTagSwordUp), "挥剑扬起");
            rDramaActionTag= rDramaActionTag.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);
        }
        private static void LoadSDramaActionTag()
        {
            sDramaActionTag.Add(Convert.ToInt32(SDramaActionTag.SDramaActionTagAswoon), "晕倒");
            sDramaActionTag.Add(Convert.ToInt32(SDramaActionTag.SDramaActionTagAttack), "攻击");
            sDramaActionTag.Add(Convert.ToInt32(SDramaActionTag.SDramaActionTagBeAttacked), "被攻击");
            sDramaActionTag.Add(Convert.ToInt32(SDramaActionTag.SDramaActionTagBreathe), "喘气");
            sDramaActionTag.Add(Convert.ToInt32(SDramaActionTag.SDramaActionTagDefend), "防御");
            sDramaActionTag.Add(Convert.ToInt32(SDramaActionTag.SDramaActionTagHandWeapon), "举起武器");
            sDramaActionTag.Add(Convert.ToInt32(SDramaActionTag.SDramaActionTagNormal), "正常");
            sDramaActionTag.Add(Convert.ToInt32(SDramaActionTag.SDramaActionTagReadyAttack), "攻击预备");
            sDramaActionTag.Add(Convert.ToInt32(SDramaActionTag.SDramaActionTagRoundMiddle), "中速转圈");
            sDramaActionTag.Add(Convert.ToInt32(SDramaActionTag.SDramaActionTagRoundQuick), "快速转圈");
            sDramaActionTag.Add(Convert.ToInt32(SDramaActionTag.SDramaActionTagRoundSlow), "慢速转圈");
            sDramaActionTag.Add(Convert.ToInt32(SDramaActionTag.SDramaActionTagTwiceAttack), "两次攻击");
            sDramaActionTag.Add(Convert.ToInt32(SDramaActionTag.SDramaActionTagWeakness), "虚弱");
            sDramaActionTag = sDramaActionTag.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);

        }
        private static void LoadBuffType()
        {
            buffType.Add(Convert.ToInt32(kBuffType.kBuffTypeAttack), "攻击力");
            buffType.Add(Convert.ToInt32(kBuffType.kBuffTypeDefend), "防御力");
            buffType.Add(Convert.ToInt32(kBuffType.kBuffTypeErupt), "爆发力");
            buffType.Add(Convert.ToInt32(kBuffType.kBuffTypeMoral), "士气");
            buffType.Add(Convert.ToInt32(kBuffType.kBuffTypeMove), "移动力");
            buffType.Add(Convert.ToInt32(kBuffType.kBuffTypeNone), "无");
            buffType.Add(Convert.ToInt32(kBuffType.kBuffTypeWillpower), "精神力");

            buffType = buffType.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);

        }
        private static void LoadAttributeType()
        {
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeAgile), "敏捷");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeAttack), "攻击力");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeCommand), "统率");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeCurHP), "当前HP");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeCurMP), "当前MP");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeDefend), "防御力");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeErupt), "爆发力");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeForce), "武力");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeHeadNum), "头像");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeIntelligence), "智力");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeLuck), "运气");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeLv), "等级");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeMaxHP), "最大HP");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeMaxMP), "最大MP");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeMoral), "士气");
            attributeType.Add(Convert.ToInt32(kAttributeType.kAttributeTypeWillpower), "精神力");
            attributeType = attributeType.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);

        }
        private static void LoadSymbolType()
        {
            symbolType.Add(Convert.ToInt32(kLogicalSymbolType.kLogicalSymbolTypeDivide), "/");
            symbolType.Add(Convert.ToInt32(kLogicalSymbolType.kLogicalSymbolTypeEqual), "=");
            symbolType.Add(Convert.ToInt32(kLogicalSymbolType.kLogicalSymbolTypeGreater), ">");
            symbolType.Add(Convert.ToInt32(kLogicalSymbolType.kLogicalSymbolTypeGreaterEqual), ">=");
            symbolType.Add(Convert.ToInt32(kLogicalSymbolType.kLogicalSymbolTypeLess), "<");
            symbolType.Add(Convert.ToInt32(kLogicalSymbolType.kLogicalSymbolTypeLessEqual), "<=");
            symbolType.Add(Convert.ToInt32(kLogicalSymbolType.kLogicalSymbolTypeMinus), "-");
            symbolType.Add(Convert.ToInt32(kLogicalSymbolType.kLogicalSymbolTypeMuti), "*");
            symbolType.Add(Convert.ToInt32(kLogicalSymbolType.kLogicalSymbolTypePlus), "+");
            symbolType=symbolType.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);

        }
        private static void LoadAIType()
        {
            aiType.Add(Convert.ToInt32(kAIType.kAITypeAttackUnit), "攻击武将");
            aiType.Add(Convert.ToInt32(kAIType.kAITypeDefend), "坚守原地");
            aiType.Add(Convert.ToInt32(kAIType.kAITypeFleeToPos), "逃至指定地点");
            aiType.Add(Convert.ToInt32(kAIType.kAITypeFollowUnit), "跟随武将");
            aiType.Add(Convert.ToInt32(kAIType.kAITypeMoveToPos), "移动至指定地点");
            aiType.Add(Convert.ToInt32(kAIType.kAITypePassiveAttack), "被动攻击");
            aiType.Add(Convert.ToInt32(kAIType.kAITypePositiveAttack), "主动攻击");
            aiType = aiType.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);


        }
        private static void LoadCharStateType()
        {

            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeBuffAll), "全属性增加");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeBuffAttack), "伤害上升");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeBuffDefend), "防御力上升");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeBuffErupt), "爆发力上升");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeBuffMorale), "士气上升");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeBuffMove), "移动力上升");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeChaos), "混乱");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeMiss), "丢失");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeNone), "无");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangePoison), "中毒");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeRecover), "恢复异常");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeSilent), "封咒");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeStop), "麻痹");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeUnBuffAll), "全属性下降");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeUnBuffAttack), "伤害下降");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeUnBuffDefend), "防御力下降");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeUnBuffErupt), "爆发力下降");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeUnBuffMorale), "士气下降");
            charStateType.Add(Convert.ToInt32(CharStateChange.CharStateChangeUnBuffMove), "移动力下降");


            charStateType = charStateType.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);


        }
        private static void LoadLogicalTestType() {
            logicalTestType.Add(Convert.ToInt32(kLogicalTestType.kLogicalTestTypeAmount), "战场人数测试");
            logicalTestType.Add(Convert.ToInt32(kLogicalTestType.kLogicalTestTypeLocationOfCoord), "武将进入指定地点测试");
            logicalTestType.Add(Convert.ToInt32(kLogicalTestType.kLogicalTestTypeLocationOfRange), "武将进入指定区域测试");
            logicalTestType.Add(Convert.ToInt32(kLogicalTestType.kLogicalTestTypeNeightbour), "武将相邻测试");
            logicalTestType.Add(Convert.ToInt32(kLogicalTestType.kLogicalTestTypeOwner), "行动方测试");
            logicalTestType.Add(Convert.ToInt32(kLogicalTestType.kLogicalTestTypeState), "武将状态测试");
            logicalTestType.Add(Convert.ToInt32(kLogicalTestType.kLogicalTestTypeTurn), "回合测试");
            logicalTestType.Add(Convert.ToInt32(kLogicalTestType.kLogicalTestTypeVariable), "变量测试");
            logicalTestType.Add(Convert.ToInt32(kLogicalTestType.kLogicalTestTypeWin), "战斗胜利测试");
            logicalTestType.Add(Convert.ToInt32(kLogicalTestType.kLogicalTestTypeLose), "战斗失败测试");
            logicalTestType.Add(Convert.ToInt32(kLogicalTestType.kLogicalTestTypeMoneyDramaAmbition), "钱、剧本、野心测试");
            logicalTestType.Add(Convert.ToInt32(kLogicalTestType.kLogicalTestTypePlaceholder), "占位指令（勿删）");

            logicalTestType = logicalTestType.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);
        }
        private static void LoadOwnerTypeDic()
        {
            ownTypeDic.Add(Convert.ToInt32(OwnerType.OwnerTypeAll), "任何部队");
            ownTypeDic.Add(Convert.ToInt32(OwnerType.OwnerTypeEAndH), "敌军及援军");
            ownTypeDic.Add(Convert.ToInt32(OwnerType.OwnerTypeEnemy), "敌军");
            ownTypeDic.Add(Convert.ToInt32(OwnerType.OwnerTypeEnemyHelper), "援军");
            ownTypeDic.Add(Convert.ToInt32(OwnerType.OwnerTypeFriend), "友军");
            ownTypeDic.Add(Convert.ToInt32(OwnerType.OwnerTypePAndF), "我军及友军");
            ownTypeDic.Add(Convert.ToInt32(OwnerType.OwnerTypePlayer), "我军");

            ownTypeDic = ownTypeDic.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);

        }
        public static void OutputConstantDictionary(PListRoot root)
        {
            PListDict rootDic = (PListDict)root.Root;
            //
            PListDict elementDic = new PListDict();
            foreach(KeyValuePair<int,String> kv in weaponTypeDic){
                elementDic.Add(kv.Key.ToString(), new PListString(kv.Value));
            }
            rootDic.Add("WeaponType", elementDic);
            //
            elementDic = new PListDict();
            foreach (KeyValuePair<int, String> kv in armorTypeDic)
            {
                elementDic.Add(kv.Key.ToString(), new PListString(kv.Value));
            }
            rootDic.Add("ArmorType", elementDic);
            //
            elementDic = new PListDict();
            foreach (KeyValuePair<int, String> kv in equipmentEffectDic)
            {
                elementDic.Add(kv.Key.ToString(), new PListString(kv.Value));
            }
            rootDic.Add("EquipEffectCode", elementDic);
            //
            elementDic = new PListDict();
            foreach (KeyValuePair<int, String> kv in teamTypeDic)
            {
                elementDic.Add(kv.Key.ToString(), new PListString(kv.Value));
            }
            rootDic.Add("TeamTypeCode", elementDic);
            //
            elementDic = new PListDict();
            foreach (KeyValuePair<int, String> kv in sundryEffectDic)
            {
                elementDic.Add(kv.Key.ToString(), new PListString(kv.Value));
            }
            rootDic.Add("SundriesEffectCode", elementDic);
            //
            elementDic = new PListDict();
            foreach (KeyValuePair<int, String> kv in markTypeDic)
            {
                elementDic.Add(kv.Key.ToString(), new PListString(kv.Value));
            }
            rootDic.Add("MarkType", elementDic);
            //
            elementDic = new PListDict();
            foreach (KeyValuePair<int, String> kv in markEffectTypeDic)
            {
                elementDic.Add(kv.Key.ToString(), new PListString(kv.Value));
            }
            rootDic.Add("MarkEffectType", elementDic);
            //
            elementDic = new PListDict();
            foreach (KeyValuePair<int, String> kv in magicEffectDic)
            {
                elementDic.Add(kv.Key.ToString(), new PListString(kv.Value));
            }
            rootDic.Add("MagicEffectCode", elementDic);
            //
            elementDic = new PListDict();
            foreach (KeyValuePair<int, String> kv in magicTypeDic)
            {
                elementDic.Add(kv.Key.ToString(), new PListString(kv.Value));
            }
            rootDic.Add("MagicTypeCode", elementDic);
            //
            elementDic = new PListDict();
            foreach (KeyValuePair<int, String> kv in terrainDic)
            {
                elementDic.Add(kv.Key.ToString(), new PListString(kv.Value));
            }
            rootDic.Add("TileType", elementDic);
            //
            elementDic = new PListDict();
            foreach (KeyValuePair<int, String> kv in instructTypeDic)
            {
                elementDic.Add(kv.Key.ToString(), new PListString(kv.Value));
            }
            rootDic.Add("InstructType", elementDic);

        }
        public static void UpdateDramaPrototypeFile()
        {
            PListRoot root = PListRoot.Load(Form1.cczDirector + "\\DramaPrototype.plist");
            PListDict rootDic = (PListDict)root.Root;
            PListDict dramasDic = (PListDict)rootDic["Drama"];
            foreach (KeyValuePair<string, IPListElement> kv in dramasDic)
            {
                foreach (int myCode in Enum.GetValues(typeof(kInstructType)))
                {
                    string strName = Enum.GetName(typeof(kInstructType), myCode);//获取名称
                    if (kv.Key == strName)
                    {
                        PListDict dict = (PListDict)kv.Value;
                        dict["InstructType"] = new PListInteger(myCode);
                        break;
                    }

                }
            }
            root.Save(Form1.cczDirector + "\\DramaPrototype.plist");
        }
        public static void LoadMessageBoxType() {
            messageBoxType.Add(Convert.ToInt32(kMessageBoxType.kMessageBoxTypeEquipLvUp), "大旁白");
            messageBoxType.Add(Convert.ToInt32(kMessageBoxType.kMessageBoxTypeHeroLvUp), "中旁白");
            messageBoxType.Add(Convert.ToInt32(kMessageBoxType.kMessageBoxTypeMagicName), "小旁白");
            messageBoxType.Add(Convert.ToInt32(kMessageBoxType.kMessageBoxTypeMapMsg), "地图文字");
            messageBoxType.Add(Convert.ToInt32(kMessageBoxType.kMessageBoxTypeMassWord), "信息");
            messageBoxType = messageBoxType.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);
        }
        private static void LoadArenaActionTag()
        {
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionAswoon), "晕倒");
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionAttack), "攻击");
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionBeAttacked), "被攻击");
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionBreathe), "喘气");
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionDefend), "格挡");
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionHandWeapon), "举起武器");
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionMoveBackLittle), "小步后退");
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionMoveForward), "前移");
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionMoveForwardLittle), "小步前移");
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionNormal), "正常");
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionReadyAttack), "攻击预备");
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionRetreating), "撤退");
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionTurnBack), "后转");
            arenaActionTag.Add(Convert.ToInt32(kArenaActionTag.kArenaActionTwiceAttack), "两次攻击");
            arenaActionTag = arenaActionTag.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);

        }
        private static void LoadArenaAttack1ActionTag()
        {
            arenaAttack1ActionTag.Add(Convert.ToInt32(kArenaAttack1ActionTag.kArenaAttack1ActionBacklash), "后退");
            arenaAttack1ActionTag.Add(Convert.ToInt32(kArenaAttack1ActionTag.kArenaAttack1ActionBlock), "格挡");
            arenaAttack1ActionTag.Add(Convert.ToInt32(kArenaAttack1ActionTag.kArenaAttack1ActionBlockBacklash), "格挡后退");
            arenaAttack1ActionTag.Add(Convert.ToInt32(kArenaAttack1ActionTag.kArenaAttack1ActionHit), "命中");
            arenaAttack1ActionTag.Add(Convert.ToInt32(kArenaAttack1ActionTag.kArenaAttack1ActionTumble), "闪躲绕前");
            arenaAttack1ActionTag = arenaAttack1ActionTag.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);
        }
        private static void LoadArenaAttack2ActionTag()
        {
            arenaAttack2ActionTag.Add(Convert.ToInt32(kArenaAttack2ActionTag.kArenaAttack2ActionChargeHit), "互相冲锋");
            arenaAttack2ActionTag.Add(Convert.ToInt32(kArenaAttack2ActionTag.kArenaAttack2ActionHit), "原地攻击");
            arenaAttack2ActionTag.Add(Convert.ToInt32(kArenaAttack2ActionTag.kArenaAttack2ActionMoveHit), "移动攻击");
            arenaAttack2ActionTag = arenaAttack2ActionTag.OrderBy(k => k.Key).ToDictionary(k => k.Key, v => v.Value);
        }
        /// <summary>
        /// 获取汉字字符串的首字母
        /// </summary>
        /// <param name="strText"></param>
        /// <returns></returns>
        public static string GetCNStringSpell(string strText)
        {
            int len = strText.Length;
            string myStr = "";
            for (int i = 0; i < len; i++)
            {
                myStr += GetCNCharSpell(strText.Substring(i, 1));
            }
            return myStr;
        }
        /// <summary>
        /// 获取单个汉字的首字母
        /// </summary>
        /// <param name="strText"></param>
        /// <returns></returns>
        public static string GetCNCharSpell(string cnChar)
        {
            byte[] arrCN = Encoding.Default.GetBytes(cnChar);
            if (arrCN.Length > 1)
            {
                int area = (short)arrCN[0];
                int pos = (short)arrCN[1];
                int code = (area << 8) + pos;
                int[] areacode = { 45217, 45253, 45761, 46318, 46826, 47010, 47297, 47614, 48119, 48119, 49062, 49324, 49896, 50371, 50614, 50622, 50906, 51387, 51446, 52218, 52698, 52698, 52698, 52980, 53689, 54481 };
                for (int i = 0; i < 26; i++)
                {
                    int max = 55290;
                    if (i != 25) max = areacode[i + 1];
                    if (areacode[i] <= code && code < max)
                    {
                        return Encoding.Default.GetString(new byte[] { (byte)(65 + i) });
                    }
                }
                return "*";
            }
            else return cnChar;
        }
    }
    
}
